<!--{template header}-->
<div class="c_header a_header">
	<a href="space.php?uid=$space[uid]"><!--{avatar($space[uid],small)}--></a>
	<h1>友情链接</h1>
	<a href="space.php?uid=$space[uid]" class="spacelink">我的空间</a>
</div>
<div class="tabs_header">
	<ul class="tabs">
	<li class="active"><a href="space.php?uid=$space[uid]&do=mylink&action=all"><span>大家的链接</span></a></li>
	<li$actives[me]><a href="space.php?uid=$space[uid]&do=mylink&action=me"><span>我的链接</span></a></li>
	<li$actives[sort]><a href="space.php?uid=$space[uid]&do=mylink&action=sort"><span>链接排序</span></a></li>
	<li class="null"><a href="space.php?uid=$space[uid]&do=mylink&action=insert">添加新链接</a>
	</ul>
</div>


<div id="content" style="width:640px;">
 <span> $smulti</span>
<!--{if $_GET['action'] == 'me'}-->
 <form name="link" method="post" action="space.php?uid=$space[uid]&do=mylink&action=deleteall" >
  <table padding="5" marging="5">
   <tr>
     <th>选择</th>
     <th>编号</th>
     <th>用户UID</th>
     <th>用户名</th>
     <th>链接名</th>
	 <td>链接地址</td>
	 <th>修改</th>
     <th>删除</th>
   </tr>
  <!--{loop $list $key $value}-->
   <tr>
     <td><input type="checkbox" name="id[]" value="$value[id]" /></td>
     <td>$value[id]</td>
     <td>$value[uid]</td>
     <td>$value[username]</td>
     <td><a href="$value[url]">$value[name]</a></td>
	 <td><a href="$value[url]">$value[url]</a></td>
	 <th><a href="space.php?uid=$space[uid]&do=mylink&id=$value[id]&action=edit">编辑</a></th>
     <th><a href="space.php?uid=$space[uid]&do=mylink&id=$value[id]&action=delete">删除</a></th>
   </tr>
  <!--{/loop}-->
 </table>
   <input type="button" onclick="selectall()" value="全选">&nbsp;
   <input type="button" onclick="switchall()" value="反选">&nbsp;
   <input type="button" onclick="unselect()" value="不选">&nbsp;
   <input type="submit" name="submit" value="删除所选" onclick="return check()">&nbsp;
   </form>
  <!--{elseif $_GET['action'] == 'insert'}-->

   <form name="department" method="post" action="space.php?uid=$space[uid]&do=mylink&action=add">   
      <span>链接名称:</span>
	  <input name="name" type="text" size="30"></br>
	  <span>链接地址:</span>
	  <input name="url"  type="text" size="30"></br>
	  <input name="" type="submit" value="添加">
   </form>
  
  

  <!--{elseif $_GET['action'] == 'edit'}-->
   <!--加载编辑器需要的js -->
   <script language="javascript" src="image/editor/editor_function.js"></script>
   <script language="javascript" src="source/script_link.js"></script>
   <form name="department" method="post" action="space.php?uid=$space[uid]&do=mylink&action=update">   
      <input name="id" type="hidden" value="$linkRs[id]" size="30">
      <span>链接名称:</span>
	  <input name="name" id="name" type="text" value="$linkRs[name]" size="30"></br>
	  <span>链接地址:</span>
	  <!-- <input name="url"  type="text" value="$linkRs[url]" size="30"></br>-->
	  <!-- 使用编辑器  -->
	  <textarea class="userData" name="message" id="uchome-ttHtmlEditor" style="height:100%;width:100%;display:none;border:0px">$linkRs[url]</textarea>
	  <iframe src="editor.php?charset=$_SC[charset]&allowhtml=$allowhtml" name="uchome-ifrHtmlEditor" id="uchome-ifrHtmlEditor" scrolling="no" border="0" frameborder="0" style="width:100%;border: 1px solid #C5C5C5;" height="400"></iframe>
	  </br>
	  <!--
	  <input type="hidden" name="linksubmit" value="true" />
	  <input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	  -->
	  <input type="submit" name="btnsubmit" value="修改" class="submit" onclick="validate(this);"/>
   </form>
 

  <!--{else}-->

  其他操作
  

 <!--{/if}-->
 </table>
  
  
  
</div>


<div class="f_status s_clear">
	<a href="javascript:;" onclick="window.scrollTo(0,0);" id="a_top" title="TOP">TOP</a>
</div>
<!--{template footer}-->